const DB = require('../utils/useMysql')

/**
 * 登录
 * @param {string} user_name 用户名
 * @param {string} user_pwd  密码
 *
 */
exports.LoginSql = (user_name, user_pwd) => {
  return DB.exec({
    sql: `SELECT user_id,user_name FROM user WHERE user_name = ? AND user_pwd = ? AND is_show = 1`,
    params: [user_name, user_pwd]
  })
}
